Excel Cases
The Excel Cases tool allows you to define and run a series of cases from a single base project using one or more Excel Input variables modified by giving incremental values to a MS Excel cell.
Cases are variations of the current model created by modifying the value of Input Modes (variables or decline tables) based on references to a specific case counter cell, which will assume in each iteration incremental values between 1 and the number of specified cases. With this, the values of all variables that directly or indirectly reference that cell (or other Excel cells defined as a function of it) will vary accordingly.
The following inputs are required:
- File: Enter or browse for a MS Excel file; if you are editing the Excel file while working in PetroVR, use the Refresh button to make sure the latest changes are included. Use the button to open the spreadsheet in Excel.
- Sheet: Choose a worksheet from the selected file.
- Range: Select the case counter cell from the Excel worksheet. The case counter cell must have been defined by a range name in the Excel file.
- Number of cases: Enter the number of cases to be run.
Click the Execute button to run the cases. If any of the requirements for executing the cases is not fulfilled, the button will explain the reason why; the hints suggesting the next step can also be useful. After all the cases are executed, the results will be displayed in the Case Results node of the Results Window.
- On Server: Run Excel Cases on the PetroVR Server. This feature is not enabled in the current version - contact the PetroVR Help Desk for more information on how to access this option.
Using Excel Cases: a Simple Example
PetroVR only uses Excel named ranges, not cell or range addresses. In order to run Excel Cases, you must first open the Excel workbook, name those ranges you intend to use, save the file and go back to PetroVR. The list of ranges will be available in the Range dropdown list. See further under Communication with MS Excel.
Since the case counter cell will be given values between 1 and a number defined from within PetroVR, any value it may contain before running Excel Cases is disregarded. However, in order to run Excel Cases the case counter cell must contain a numeric value (i.e., it cannot be empty or contain text, etc.)
The range must contain only one cell; otherwise, a validation failure will occur.
When running Excel Cases, any Econ variable defined as Excel Input is not regarded as a Monte Carlo input but as an output, that is, its value is not updated in each iteration.